package com.itkaien.anno.datasourceDemomybatis;

import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestDemo {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(connectiontUtils.class);
        connectiontUtils connectiontUtils = annotationConfigApplicationContext.getBean("connectiontUtils", connectiontUtils.class);
        System.out.println(connectiontUtils);
        People people = annotationConfigApplicationContext.getBean("com.itkaien.anno.datasourceDemomybatis.People", People.class);
        System.out.println(people);
    }

    @Test
    public void test(){
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(connectiontUtils.class);
        People people = annotationConfigApplicationContext.getBean("people", People.class);
        System.out.println(people);
    }
}
